﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lab1
{
    public static class UserAnswerService
    {
        public static Dictionary<int, UserAnswer> UserAnswers = new Dictionary<int, UserAnswer>();
        private static int _currentNumber = 1;
        public static int CurrentNumber
        {
            get
            {
                return _currentNumber;
            }
            private set
            {
                _currentNumber = value;
            }
        }
        public static void Add(UserAnswer answer)
        {
            UserAnswers.Add(CurrentNumber, answer);
            CurrentNumber++;
        }
        public static void Back(){
            UserAnswers.Remove(CurrentNumber);
            CurrentNumber--;
        }
        public static void Begin(){
            UserAnswers = new Dictionary<int, UserAnswer>();
            _currentNumber=1;
        }

    }
}
